#ifndef ENEMY_H_
#define ENEMY_H_

//#include "../Game States/CHubState.h"
#include "CBaseObject.h"
#include "../SGD Wrappers/CSGD_Direct3D.h"
#include "../Core/IListener.h"
#include "../Game States/CMainMenuState.h"
#include "../Animation/CAnimation.h"



class CBaseEnemy : public CBaseObject, public IListener
{
private:
	int shadowID;
	float shadowScale;

	int shadowYOffset;
	int shadowXOffset;

	bool m_bFriendly;

	bool m_isHeld;

	bool m_bAlive;
	bool m_bPassive;
	int m_nAttackPower;
	int m_nWeight;
	float m_nAttackRange;

	float baseHP;

	float speed;

	bool hasDied;
	
	Vector2D m_vDistanceToPlayer;

public:
	bool flip;
	//D3DCOLOR color;

	void SetShadowScale(float newScale)	{shadowScale = newScale;}
	void SetShadowYOffset(int offset)	{shadowYOffset = offset;}
	void SetShadowXOffset(int offset)	{shadowXOffset = offset;}

	float GetBaseHP()	{return baseHP;}
	void SetBaseHP(float newBase)	{baseHP = newBase;}

	int GetPower() { return m_nAttackPower; }
	void SetPower(int newAttackPower) { m_nAttackPower = newAttackPower; }

	bool GetFriendly()	{return m_bFriendly;}
	void SetFriendly(bool isFriendly)	{m_bFriendly = isFriendly;}

	float GetRange() { return m_nAttackRange; }
	void SetRange(float newAttackRange) { m_nAttackRange = newAttackRange; }

	int GetWeight()					{ return m_nWeight; }
	void SetWeight(int newWeight)	{ m_nWeight = newWeight; }

	bool GetAlive() { return m_bAlive; }
	void SetAlive(bool newAlive) { m_bAlive = newAlive; }

	bool GetPassive() { return m_bPassive; }
	void SetPassive(bool newPassive) { m_bPassive = newPassive; }

	Vector2D GetDistanceToPlayer() { return m_vDistanceToPlayer; }
	void SetDistanceToPlayer(Vector2D newDistance) { m_vDistanceToPlayer = newDistance; }

	CBaseEnemy();
	~CBaseEnemy();
	virtual void HurtMe(int AmountOfDamageTaken);
	virtual void Attack();
	virtual void Render();
	virtual void Update( float fElapsedTime);
	virtual void HandleEvent(CEvent* pEvent);
	virtual bool CheckCollision(IBaseInterface* pBase);

	float GetSpeed()				{ return speed; }
	void SetSpeed(float newSpeed)	{ speed = newSpeed; }

	virtual RECT GetHealthRect();
};
#endif